Adding documentation and checking internal check logic