Implemented proper collision function. There are... issues.