Make methods private in Loader and fix redundant checks in Json and Xml