Refactored todo into php