Refact on present modal code