Tidied up RFC1870 and added more configuration options