Added consistency with library

as.Key is renamed to as.NewKey (because NewKey is the name of the function)
client(host string, port int) is renamed to NewClient(host string, port int) - (because NewClient is the name of the function)