cosmetic changes and removal of dead code