Remove redundant packege imports. Replace main package, tests file. And other minor code improvements.