documentation fix
formatting, better docs
TODO
Major refactoring (run some tests)