Adds tests; updates README.