Improve error
Improve for server timeout
Support for error result
Portnum to port
Improve dictionary initialization
Add documentation