Made code readable / editable.

This code was basically just a MASSIVE single line of code.

All I did was make it readable by expanding it across 90+ lines of code so you can analyze, edit, etc. easier. I am fairly positive that everything works the exact same as before, but please do a quick double check before merging.