refactor: Clean up code and add jshint.