refactored file-related helpers; mem widget