Changed from depricated function to another in admin. Trimmed unused code.