update code convention of the project
add ECMA5 compat array functions