Moved collision detection to logic() and added getName()
Splitting update into two.