Upgraded compiled C functions to be compatible with R 4.4.1. Split C functions into separate files to make them more readable.
This primarily involved manually defining M_PI, as well as moving to using R_Calloc and R_Free functions within the compiled C code.