Inline some of the factory methods (not all can be inlined easily)

See #6.