Add collision class

Move collision to a separate class