clean up the loop conditions and make dedicated methods. Make tag filter work more reliably, bump version