correctly handle files with no markdown content below

also:
- don't break on .md files
- clean up code for Content class