Start of the refactoring process

This revision is unstable.