Fix JS warnings and style