Formatting

Made a few cosmetic changes to the code, mostly making formatting and
naming conventions consistent.