Finishes logic in .js. Minor updates to HTML