Cleaned up compiler getting queries