cleaned up and added documentation
Merge remote-tracking branch 'origin/master'