Some C improvements