Wow, those parentheses.. @fism88 Have you been working a lot in LISP lately? ;-)

But yeah, just extracting some methods would make this a heck of a lot more readable.