Code improvements to comply with strict PHP. explode() and end() now
handles variables only.