Consolidated code in specs to smartlog functions.