Improvments/fixed style

Main changes:
* move logic layer to template tag,
* added divider and dropdown menu.

Please review @xliiv @quamilek 

Convert tab to spaces