combined header/popup into single method:w
added footer to generic handler