Main c file