-added temp layout fix

-changed viewer to write page directly and not read from file to write html