Cleaned the examples and the src a bit, plus docs
Merge pull request #557 from alvinsight/dev

Cleaned the examples and the src a bit, plus docs