added model dispose. fixed dynamic frameSize and nPlanes.