More or less finished plugin

Added missing stuff
Formatted messages nicely
Somewhat optimized existing code
Plugin should be ready for use now