Some code cleanup and improved spelling consistency