Add missing stuff

Format messages nicely
Somewhat optimize existing code
Plugin should be ready for use now
Merge remote-tracking branch 'upstream/master'
Merge pull request #1 from softashell/master

More or less finished plugin