Cydia: remove duplicate code