cleanup line decoding