cleaned up main.js, assignment 8.1