Page visited db tables & logic + small fixes