refactored classes, added interfaces, now lossely coupled