modal refactor + changes to jquery-modal plugin