Refactor admin flash message handling