more tests. restructure tests. use chai.