Merged Ian's changes

Also a few more minor edits