Fixed and cleaned up adler32 implementation