Tidied up

Minor fixes & code cleanup