Update ToBinary to an independent class 

Remove the main and add printout function