Updated user-interface.js and completed unit testing