adding mockito
more refactoring and tests
more tests
updating documentation