Added basic HC functionalities and rewritten the raycast