added changelog, tests, repaired bugs