Rolled most smartypants into markdown; added tests