added some interfaces and made methods virtual, to make mocking easier. Solves issue #10.