various improvements

+ added templates (friends, settings, etc…)
+ supports class=“active” links