adds more unit tests and changes schema to make tests pass.