Create new classes to control query builder and basic metric class