re-organise directories to maximise code re-use