Refactored solution and added QueryServer