Move service definition above template