loca table fixes and added RLE encoding

I'm unclear on how an else relates to a for loop