Auto-Refresh and Attributes update

Added new hook Refresh that occurs when an auto-refresh has happened. Fixed SetupAttributes being broken by last commit, updated attributes library to avoid duplicating attributes after a refresh by checking if it already exists or not via its uniqueID.