a few cleanups to contract bits