More cleanup and tweaking