reorg and add some utility scripts