Moved markdown text processing into lib/