cleaned up and added a few quick and dirty tests