Reformatted viewer.php