Refactored code
Updated changelog