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