Fixing various undefined references