Cleaned up pattern match for tap
Moved control of emulator shutdown to app.config