Fixing some things up and getting rid of demo code