Create util.c

This will contain the methods used to do everything.