cleaned up if/else using getattr on telnet_class, also better organized function names