Merge pull request #1 from adam-vessey/7.x

Get CSV download working and coding standards.
Make the access checks actually check something.