Patch.xs: Added patch support
WIP: Tests