Move menu creation into functions.