Rewrite lpc2ref to get correct results without leaking memory
Fix: Write out of bounds by one byte
Fix memory leak on a corner case
Fix memory/file leaks
Fix more leaks
Make UList destructor virtual to avoid undefined behaviour on which destructor should be called