Updated because of WCF API change.
Fixed small issues.