removed unused funcs and const correctness
Add host name to connect message