Added user interaction loop, domain classes and factory object.