[Olena-patches] cleanup-2008 2447: Add traits for windows and factor code.