Sign handling, mask filtering, various fixes.
Merge branch 'master' of https://github.com/hamish-milne/slde