clean modals code