Updated code to follow PSR-2