improve logging, and SM_ var names