Updating some more files to be a bit more readable and optimised as far as removing un-used variables and moving scopes around to optimise the variable creation process.
Refactoring some more files.