Cleaned up code in seq.c and util.c