Refactor and Cleanup.