Fix a few issues with section parsing and embedded code