Made changes for merge with master after long hiatus.