Refactored code, updated UI and related code, added code comments, and updated icons