cleaned up a little more, added more tests