Added dependency injection. Added interfaces for classes that didn't have them