code indentation and added code that allow interactive embedding and display of first frame