First code commit.

Note that accuracy=2 is currently unusable.