Updated all string based queries to prepared statement syntax