multiple fixes and minor additions