Fixing several compilation issues related to the in-progress migration of matrices/ to src/