Added more unit testing and began working on some error handling