Adding Repository check and context handler classes