Split out UI into separate main.c file