moved emulators script to optional
make use of recently added high-level function, improved comments and cleaned code