Implemented a lockout mode.
As well as a slew of fixes.