Outsourced collision handling to its own module. Everything works like it did before with all known bugs kept