Contract now fully working

Minor Date SQL bugs fix, Contract and All fixed