Improved attributes parsing and defaults for types