tuned some part as per Google JS style guide