tidy
extra stuff into vars
externalize mailto details
conditions
tidy and externalize max records to process
styling for index page