Added entities, factory and add functions(temp commit)