tidy up license headers and add --version option to server program