more refactorings, added autocomplete directive and a byTag filter
fix merge conflicts