code cleanup and update changelog