Removed Queries
Fixed compile errors