Moved docs logics to service