Added node metadata storage and fixed other bugs