Minor refactor to clean up codebase.