Started implementation of main and genFactory