Closes #25. Pulled image stuff into its own factory.