Minor stylistic quibble, but aren't opening brackets `{` meant to have their own line?  Also line 486.