Reworked the javascript module system