Dead code removal, fix for cleanup GitHub issue #28