cleaning up code

preparing to test from scratch. cleaned up code.