Initial refactoring

Obvious...