refactor changelog generation and fix some bugs on the way