Review: Cleanup factories, and make them more consistent. Add factory documentation.