Lots of nice fixes