Added documentation and cleanup for main.js, enabled on screen keyboard