Modernize insert.c

Make it less hardcoded and more similar to delete.c.

That way we can pass the values from command line in a follow up change.

Signed-off-by: Thiago Farina <tfarina@chromium.org>