fragmented out collision functions to separate class

Signed-off-by: Alexander Skjolden <alex@plastboks.net>