refactor overview and detail pages