Implmented contact test, and changed stuff in contact