This should be broken out into a separate method. It's not really pretty either, did you talk to @asutherland about a better way to do this?