Added output window, line drawing. Cleaned up interface and backend patch