Updated the example
Merged Eric's changes and deleted unused code