This method could do with a refactor.  The addition of this code is pushing it from busy to hectic.