functional split of modal elements working, still fixing bugs