changed mframe directive to restrict to element type and made some other tweaks