Added buffer.c, will write the rest