Refactored history page