small tidy up & remove unused code