Started writing viewer code