Lots of more changes, tidying up, defining structures...