Refactoring and re-organisation