Significantly more error-checking as well as a more comprehensive build script, and separate flash/run scripts for the device and emulator