Merged Nick's and my recent commits