formatted
Fixes #25. Added more tests and some TODOs regarding #23.