Hd resize

Merge HD branch into master