Added attributes to metadata.rb and other fixes.