made output from -o a bit more informative
switched to reduce-based method to find latest version
moved logic to find latest version into deft.js