Fixed up the contract screens. Removed the outputting of NULL. Added value checks. Removed dead code.