Misc. Refactoring.