-Refactor and change code style, remove deprecated methods