Cleaned up some GUI and serial code