Refactor more and add UPGRADE guide and CHANGELOG