SETUP.py rewritten

Due to me being clumsy I had to rewrite SETUP.py.
The new code looks neater atleast.