Split program into ui and cli files