Don't fail when a constraint reference can't be bound
Clean up keyboard handler
move js files to lib folder
Move methods to their owners