Got more codes done

This script should be able to run. Some functions are missing. But
should run.