WordPress coding standards compliance

Updated most theme files to bring code in line with WordPress coding standard.