More cleanup.
Refactor a bit