Added entity.ijs; collision detection function