Merge of James' branch