clean up the method/type descriptor parsing logic.