added some postamble
tidying up layout
added support for required parameters