A few fixes and enhancements
Compiled for testing (again)