refactoring, dropped ``using namespace std'' (which pollutes global namespace); related
updates