Refactoring and removing of the old code

Collision must be rewrited completely