Restructured js directory and added separate dependencies and user-interface directories.