Rewriting the Types system to be more flexible. I've split this into a branch to avoid breaking anything in case this fails miserably.