Implement close and maximize buttons