some cleanups and cosmetics