more design tweaks, tidying up comments etc