Further refactoring, make classes more coherent