Creating a Tilt-Compensated Compass

I didn't calibrate the magnetic sensor

That was your mistake, which explains the following:

The compass heading prints a number like -45 for what i believe to be due north, and only seems to range from -90 to 90 as it is spun around in all axis directions.

You also have to correct for the local magnetic declination, in order to determine true North.