Climate-change bill includes nationwide building energy code