Had to change JModel to JModelLegacy or there were fatal errors. Also - the load language function is not working so I had to comment it out for now.