Fixed up contracts so that they are properly called and changed from comments. Still need to do coersion and fix loops.