Modified some functions to protect page visibility for public view