Merge changes from elliotkendall branch