Added (incomplete) support for executing queries