Cleanup and fix example scripts