Updated compare funcs to not use memcmp