Changed some of the function names because they conflicted with Google closure compiler.