cleanup portal template