cleaned up model import & removed raw pointer
cleaned up code