Added more unit tests, fixed build error