Improved mock generation.
Started implementing mock factory.