Almost done. Crashes fixed when no model is there and resizing is working