refactored terms tab

better trash handling, updated UI framework