Several changes

Duplicated code deleted.
Lifebar logic is implemented, as the SpriteGroup logic.