Rewrote coilcube app

Now has a proper state machine.