Simplified controller

The controller was too complicated.  This new version is logical and
transparent with more obvious branches.  However it contains a fatal
flaw that must be fixed and that is record nav an case navigation.