Merge of Andrew's changes