Updated clean line functionality