Refactoring structure and error function handling
messing around with dummy test spec class, will move to rspec soon #promise