Minor code style issue here: could you move this so that its under the same if statement starting on line 325