[Refactor] Minor renaming of variables etc + changed comments
[Perf] some perf related tweaking
[Minor] Rename functions
[Refactor] Minor - Moved functions around