Implemented input mapping.
Added documentation.