added documentation and stylistic attributes