Merge branch 'master' into develop

Merged back in 4.0.2 changes.
Made a fix so that items are always in the same order as in the config file.
Added a new plugin that allows shell commands to be run.
Made some optimisations to code, tidied the code and fixed some small bugs in
the news plugin.
Merge branch 'develop'

Merged in 0.5 changes.