Remove some dead code and general clean up.