Contracts working

I'm not sure if I put the correct contracts on, but these are all lenient enough to pass through compiling everything and running all the tests.