Merged work from jh-work branch.