PHP pages overhaul