added markdown features, styles. fixes to logic