Some optimizations & polishing following PR #3381
3 files changed