Remove redirect logic from view file.