Refactor to fit PSR-2