Replaces Coffeescript file with JS

Replaces the last Coffeescript file with JS. The functionality is the same apart from some cleaning up of unused methods and variables.