update headers, use const for better performance (.500ms on ~2gb file), update comments for functions