cleaned up a bit, and added basic tests and coments