Finish up code reorganisation.