If factory returns a value use as export.
Merge pull request #17 from abuiles/exported-value

If factory returns a value use as export.