Remove "mode" and pass domain as argument