Use function call instead of constant

The current constant is calling a function every time the extension is initialised. Since there is already function level caching this doesn't add any efficiency - so this PR switches to calling the function when required.

Note that most of the PR is whitespace & some comment block fixes - I use phpstorm & it likes these things to be correct.