Refactor

Total refactor to bring project in line with class diagram.