Proper checks on contact operations are done

This commit covers the Home Work 6.
Some git conflicts were resolved. I hope actins taken were correct :)