massive cleanup of infoview function