updated code to meet with MediaWiki coding standards