Fixes, improvements and bug fixes