Refactored code
Added install version option