Fixed all remaining compile- and link-type bugs.

CoreFoundation.framework now builds!