Remove trailing whitespace.
Define hostname as an option.