Refactored Entry Point