Moved input function to a separate header for input/output operations. Added include guards to mainwindow.cpp