Write proper comments in tools.c