Responses to testing

Some bug fixes, added header line to csv output
minor form update