Fixed bug, Added better closing sytem and added a function def button!!