Added internal model creation, added model refresh