VArious fixes and enhancements