Some long overdue fixes

Caution: things will be broken for the next few days but its all for the better.

This post was last updated .