Relative Indexing and memory leak fix

Because who needs sleep?
Also forgot to close a leak under certain conditions. All fixed! (for
now).

Objects now need local indexing. Which is actually better than
hard-coding it in. Yeah!