clean code
multithreading for cabac ready