Add -Werror
Redo key control system
misc fixes