Refactor ready for the new admin manager pages etc