refactor code v1, use requirejs for cloud-sponge lib