Added rm and changed to ANSI C