Brain surgery

Some fixes from the past week plus some config work.