Updated changelog, some refactoring