Cleaned up some TODOs and code smells.