Added more unit tests and fix import