removes qbox and tidies up a bit