Improvements and fixes