Code refined.
viewer should be controled in the next version