Changed all old defined values to new SkyDefines. Not tested yet! Cleaned up some code.