PHP version++, refactored, code cleanup