Refactor Old View Code