Added all the code but this version has the ugly gui