Tidy up 5.3 issues

Removed gzip usage for older versions of PHP where the context was
not properly passed. Also removed use of lcfirst.
Code style tidy up
Merge pull request #79 from ianbarber/master

Tidy up 5.3 issues