cleaned up tests and added comments