Break out functions to RAT_driver.{h,c} and rename old RAT_driver.c to main.c