Modified code in meta_attribute_info to be of
correct syntax. Few refractorings in other areas.