Refactoring and minor tweaks
Prepare changelog