Refactored the code to simplify the method for launching a selected version and to better conform to good coding practices