Fixing invalid if-clause

fixes #227
Replaced ServiceTracker by Declarative Service references

fixes #228