1. if event.type == pygame.QUIT:
sys.exit()
You may be better off also telling pygame to shutdown. This won't help much though if you are running pygame programs from single process IDEs.
if event.type == pygame.QUIT:
pygame.quit()
sys.exit()
http://pygame.org/docs/ref/pygame.html#pygame.quit