added open file dialog
removed some debugging code, minor code cleanup