Added query executions and quotes

Added query executions and closing quotes to some echo statements. We
still need to add extra safety though