More cleanup. untested