General Refactoring

Used to track the progress of refactoring configuration writing, reading and accessing and switch to swtich-case statements instead of if-else statements in some parts of code, also finish formatting some stuff

Edited by JoshMayBalGitHub