Tags implementation + a few bug fixies