Add support for symbolic link to current version
Indention
Remove duplicated code