Modular curves and the class number one problem