Fix #22 and refactor service binding code
Merge pull request #33 from spapas/master

Fix #22 and refactor service binding code