Fix collision callbacks, add type variable to entity base