refactored compareVersion()

return as quick as possible if minimum and current version is the same also cleaned up some formatting.