Moving tests to their own file. Comments and little fixes. Tests
currently don't pass.