CLOUDIFY-1705 Better communication error handling
Fixed checkstyle warnings
Fixed type resolving problem