Detect Code, Refactor Error Page