Refactored.
Updated tests.
Changed the way scripts are loaded in development mode.
Fixed mode function.