Code cleanup + support for 4GB+ files

Also removed test files