Refactor and Enhancements