bitreader code cleanup