General tidy up@
Add tests