Changed module wrappings to include dependencies

Works with RequireJS and should continue to work from <script> tag