Refactors duplicated functions in ilr_bean_admin