Code review on #12

See commit messages for detailed informations on what changed.

Needless to say tests are still running properly (thanks for providing tests!). :smile:
I am unsure about this calling `.substr`. This will do a copy of the whole string starting at cursor.