Fixed collision bug and removed unnecessary code.