Improved the modal and fixed several things