Refactoring, repackaging.

Introduce simple discovery service.

Implement some missing web-service methods.