Cleanup and fixing some long outstanding bugs

Development on this plugin is not very active, time to update the tool with some long outstanding wanted fixes for some people. Didn't want to just push back all my changes because I want to make sure that stuff is still functioning after we have updated something.