Added rake task for reloading js
Refactored and transferred logic to main game scene