Damn, did this all to help someone here in CG who was having troubles, went back to the thread and found an easier solution:
Avoiding polar distortion by ~Naeddyr on deviantART