Moved some helper functions to admin_helper