Added some GUI controls. The gui opens and shuts at the beginning.