Rename attributesFor to generate, and cleanup

This provides some cleanup, and makes for a more intelligent public api too.