So essentially this is my current library setup var myLib = function(e){ this.version=0.4; this.e=e; this.css = function(){ }; if(this instanceof myLib) return this.myLib; else return new myLib(e); } Code (markup): But its getting too big and I'm wanting to put other functions in other files. E.g this is myLib.js but then I want say another file called myLib_ajax.js which still uses the myLib global variable. How would i be able to do this and is it possible with my current setup?