Added various tests, and cleaned out comments.