finish documentation, apply code style