Review syntax and do some improvement (performance issue in progress)