Refactoring QueryLayer into smaller more focus objects