Refactored PHP Web