Improvements based on comments