refactor: Remove code duplication