remove old code, and make a couple of methods private