simplified build script
fix various bug
remove diff