Refactored data retrieval methods.
Refactored calculation of last IFD byte.