Clean up & fix examples

This pull requests fixes a myriad of syntax errors and just a general clean up.