SOC_U: Some rewrites and fixed some warnings.

Less ifdefs in the actual functions, yay