general fixes and performance improvements.