First version of documentation complete
Bugfix and cleanup.