Added basic error checking and tampering checks and initial code to page.