move tags code to proper lib
move tags code to proper lib