update vairable and function names according to JavaScript coding styles