Implement command-line interface and structural changes