Make code follow wp standard and fix a few typos