cleanup and documentation
Merge branches 'dev' and 'master'