massive rewrite...

WARNING: for various reasons, this is not backwards compatible with upstream/master, hence the version bump. README.md will be completed soon...