separating viewer from main module