cleaned up a lot, added a test or two