Emulator: Refactored command line option parser