Update dependencies, code style and improve example code