I advise using more vertical whitespace, to organize big chunks like this into more readable blocks of code.