New source commit (broken/incomplete).

I'm sending my laptop to the shop, so have fun with this version
which I didn't have enough time to fix. A lot of what you see are
brought over from the old branch and have not been tested yet.