Modal works and some other cleanup