Implemented and documented input handler. Closes #276.