add (1) random-file; (2) ezs-common; and refactor code