Replaced duplicate callback handling logic with an abstract callback handling implementation
Reorderd MockServer functions