Modified code to be compliant with WordPress style guidelines