Sorted out the error messaging so the page functions at its minimum