Improvements and bugs