Fix bug with Makefile generation + Move string functions to another file