Some cleanup, C-memory function substitutions, MCAL stuff, etc.