Fixes auto anchoring. Refactor emit.

When using auto_anchor the entire tuple gets added to the anchor array instead of just the id. This change fixes that, and makes it so that the anchors arg will override auto_anchor.
Also refactored the code to reflect that args will be defined, even if the user doesn't supply it.