Various Updates

Various updates and fixes. Please see commits for details.