Added init popovers function
Refactoring