General cleanup and rationalisation