Split input handling into a separate module

Plus:
- enable C++11 mode and warnings
- add vector classes with operator overloading