added new classes to implement the new program entity-system.