complete refactoring
cleanup
more cleanups of docs
added cleanup doc
Merge pull request #1 from lorenzog/master

after some personal refactoring