Removed unreferenced function and moved constants out of the global scope.