Add test.sh and integrate extract and cluster