Added does keyword, extended generate.rb