Added folding of main target sequence, compression of object so that it can be saved light weigth (and sent light weight)
Fixed silent bugs after refactoring where ii < undefined  -> returned false, instead of throwing an errow, which hid a
terrible bug.