put viewer in single dir; added rewrites