Some code optimization and review