Made a prototype for a PWM pulse demodulator. Broke out bit_packet functions into own file to avoid circular references and for clean up. Compiles cleanly, but untested.