Added more tests, cleaned some comments, and added more error types