Somehow, everything fell into place and hit detection works