Replace RAM clearing with dedicated variable reset