fix spelling issues and ruby style