updated #parse_content

More tidying up of content / chunks so that:
1. code more readable (intuitive variable names, etc)
2. chunk_class-specific behavior is moved out to chunks (much of it was in the parse_content code before)
3. API more flexible