a few cleanups of the code so it compiles.  still linking problems with phys_demo