Cleaned up the modal api.