do some error checking
initialize default options
write help stub so that program compiles
add cases which were missed earlier