Uploaded Factory class

This class is meant for the creation of predefined entities. This
version supports the creation of a tree (StaticEntity).
Updated Main class to use Factory class instead of raw Instanciation