Refactor main module. Version bump. 0.4.1