Changes to editor module to better handle code sections