Made button click variables local