Improvements and cleanup