Updated example files
Patched some bugs