more refactoring

introducing the dependency inversion principle, now the model is free
of any html