removed underscores in variable names to conform to https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#Naming