PSR 0,1,2 code from the old version