Refactored packages and added a main.py as primary CLI entry point.