big changes. Replaced cli interface. Improved code. Added mored tests. Refactored directory layout, etc