small tidy up & fixes