Buildfixes part4

So, build fixes are almost finished. About 4 still need to be fixed.