SOme cleanup and file refactoring.