Cleanup.
Use fseek to waste less RAM.
Vastly improve performance and use less RAM.