Commented and adjusted scope on server functions