Lots of enhancements/fixes