tidies up some stuff