Cleaned up some stuff in view.php