Unused classes deleted
some refactor
tests updated