Factor everything that deals with the examples into a separate file