fixed input handling

+ fixed input handling
+ spirit renamed to player, now its a singleton