Improved attribute parsing.