Made the main window and container dynamic f/s