added improvements and bug fixes to opening and closing the ppt aplication