Merge pull request #2 from alistra/master

Assorted changes + 3x-4x speedup on "image" query
Tidy up language string code.
Merge remote-tracking branch 'origin'
Clean up some analyser complaints, and a potential memory leak.