A C++ version of quash with the execute functions merged into it