Converted model loading to taking JSON