- Implemented diagonal keys.
- Some more code refactoring.