First attempt at Query class