Made setCollision one function call instead of several