Implements inversion and demodulation functionality.

A fix for #43 and #44 - if you'd like to add that functionality. I can understand if you feel these features are outside the scope however.