Added pre-existing gui code.