Add test related scripts
Optimize & Fix error
Modularize & Change data structure