interface.js code cleanup
fixed failing testcases