Cleaned up the code and remove optimisation from cflags