Refactor: Got rid of ptr_end

Instead of calculating ptr_end, simply keep track of the size of the file,
and use that as a maximum offset into it.