Added phpDoc, changed variable names