Added option element to save the plugin version in the database. Changed the upgrade method to check whether the current plugin version is newer than what's stored in the plugin options.