added keyboard functionality, removed console.logs, added comments