bunch of changes around modal and stuff