Added some abstraction with interfaces.