Fixed issue with array of array, added get model directory function to connection class