The single script is about 800 lines. All the functions exist within those 800 - no seperate modules (though that may be the next test). Each function starts with some sort of logic, to determine if it should be called such as:
_if_ (_context_.type !== 'create' _&&_
_context_.type !== 'edit') _return_;
_if_ (_runtime_.executionContext != _runtime_.ContextType.SUITELET) _return_;