use popup for comments
minor refactoring