reorganized unit test code and split REST interface to separate script, rest.js