More conversions and lots of tests

Not everything works yet. I mainly pursued low-handing fruit here. At least most of the tests should be somewhat sound and provide a starting point for what's wrong.

PowerShell (again) doesn't adhere to the spec everywhere. And the spec is somewhat contradictory in places, too.