Tidy up some events and refactorings
Remove RoR app
Refactor some button code