Made domain name an option, DRYed up public files