Split out UI into separate main.c file
Prepare to run in kernel mode