update wordpress core to 4.0 and various theme code cleanup