cleaning up code, fixing a few bugs