sets option variable for all entities and cleans code

The option parameter is used whenever any styling related to any graphics item is to be done. Since entity is to be styled when its state is changed, so 'state' option is accessed and styling is to be done in selected state so 'State_Selected is chosen.

Coming to '&', it is bitwise operator here. I saw this in some examples and the 'option' being an unused parameter has been giving warnings. To cut them short, this all is done.