Added name-match and latest-only option

Should fix issues #129, #139 and #158
Please use spaces for the indentation, not tabs.