More cleanup and testing