Refactoring

Details to come...