some tiny changes (to be consistent in including libraries, and using namespace std)