refactor upgrade and resources of the addon