Fixed PSR-2-code-styling, added life-cycles to the entity.