ServiceBase is implemented.
Some refactoring done.