added license for each file
added main window
added errors handeling