Ported over GUI code to main project