css fix for modal
some code improvements