Refactor test page