Modularizing the menu scripts (a bit, needs to be far better than it is now).