added lots of comments and added CEntity.cpp