Your code is effectively double-spaced through here for no real reason. Either drop all of the newlines or most of them (to retain 2-4 line logical groupings of actions).