Improved code gen: Added support for attribute searches.