fixed minor bug, cleaned up comments, made sure tests pass.