Changed to c1x standard and fixed compiler warnings