some light refactoring of classes into packages