regression fix: markdown now properly detected
Cleanup and additions; focus on CLI only