More refactoring fun.Fixed typo across a few files, renamed var.