Dead code removal
Remove code duplication