Doing a bit of refactoring to checkin code to make cleaner.