[In Progress] Added errors class and began refactoring