Tidy up. Remove soon-to-be-obsoleted code