Chris: Merged Adam's work in master with Chris branch, code is unified!