code cleanup and npm update