adds mixins and refactores some code
working on modal dialogs