Correct collision detection of bullets and simplfy code