Implement enhancements in issue #2