Define main program at top.