added extension service tests.
code cleanup.