Added RTC test functions, cleaned up main.c.