Added file handling and changed settings behavior a bit
Made diagram responsive to setting changes