Added .gitignore file to the repo.
Added selection algorithm for the versions.