A bit of documentation.
Add some tests to reader.
Playing a bit more with functions, small refactorings.