moved the template tags to the app level and checking if favorite exists for an object by the template tag
generating add-favorite links via template tag and some small refactor and bugfixes