Added documentation, did some refactoring
Merge
Minor fixes in the demo