major refactor of modal: no window refresh event is required now, changed css to work with table/cell and heavily reduced the modal view code. corrected some jshint issues