Implements some cleanup that was suggested on the merge for the original port to gsettings
1) aligns variables and functions
2) makes functions static where they should be
3) C89 compliance
Fixes (LP: #1042323). Fixes: https://bugs.launchpad.net/bugs/1042323. Approved by Sam Spilsbury.