fixed lots of things requiring fixing