Cleanup use of variables in views