Added name-match and latest-only option

Should fix issues #129, #139 and #158
Pleasee fix coding standards:

- use spaces for the indentation, not tabs
- always use curly braces for conditional structures, even when there is only 1 statement