added shell; cleaned up emulator