fixed annoying bug with shutdown, added uuid generation and saving