Added tests, fixed grind method.