Work in progress (changed code to be PSR2 compliant)