Finalized the POV hatswitch code.