Restructured project to produce seperate exported module and CLI command