Several small changes and fixes
merge