Improved animation handling

Fixed entity and sprite flaws