Merged in changes from John