Life has a way of making us embrace habits that are of no value to us, it takes lot of determination to ensure habit that matters remains while we stay away from the ones that can harm us. From the looks of it, it seems you already found a solution for the two bad habits, all that is remaining now is to follow through.