Add footer and refactor madal window