Started work on input manager.

This is related to #7.