Moved service definition up