Improving code for the rqa and rp

Organizing and correcting the black dot count