More cleaning up / refactoring.