refactoring whole module, add tests
update package meta stuff