HD options added and some changes in existing code.