cleanup and some cosmetic changes