Refactor JS, style changes, add key