Added more functions to the plugin and fixed some small bugs.