I know you are following the style set by the existing code here, though considering the issues with the existing code, that is not good. Please put the new behavior in some small, well named functions, that do one thing on one level of abstraction. Related: http://vimeo.com/12643301