Code cleanup and node upgrade