Fixes #477; Refactoring

- Refactored the files in waterbear/scripts. Mostly changing function signature syntax to be consistent     across all files. Didn't find any classes that didn't follow the class-naming convention in #477.
- Added a minor fix to waterbear/scripts/workspace.js where upon clearScripts, the scriptLoaded variable wasn't being reset correctly, which caused the first block to be dropped on the workspace to NOT register.