Added more unit tests and improved existing (90% coverage now)