Properly fix the serviceprovider...

to get rid of parse errors and unnecessarily duplicated code.