refactor backend.js, take server and arduino ports from command-line
merge backend changes and file moving