Added addComponent and getComponents to Entity class