Additional amends and fixes. Preparing for possible rewrite of the system.