Removed message boxes and added GUI functions