Allow interfaces as class in service definition.

As mentioned in #2, we should allow interfaces as class in service definitions.