replaced modal, fixed all ajax request issues and refactored css and js files
modal now hides correctly when closed