Fixing js bug, cleaning up html