Remove unused/unneeded code, minor tidy up