Refactoring after feedback

- Refactored most of the code based on feedback.
- Implemented better version comparison for the update action