optimize: use hash instead of an arrary to store bracket level, address Yichun's comments and add --nginx=PATH feature