Miscellaneous tidying up