Service registration and factory