more cleanup in interest of code reuse