Major updates. Added docs, tests and lots more features.