Minor tweaks - i really need to rip this out and start again