fixes and refactored hostname