Fix Query, add block constant, add ExecCommand function