Merge GUI and backend