Some optimization and clean up of bitstring related code. Fixed timeleft updating.