added hostname configuration

- [x] Added hostname configuration key
- [x] altered tests

This is in reponse to #642