added a markdown lib
added documentation
code cosmetics