Added the input handling

Tweaked some rendering code and added a bit of documentation