Added lots of documentation, reduced memory footprint
Merge commit 85eb9a6 from detached HEAD