Refactored the `log` and `script` functions in frontend class for readability
No longer directly access `$_GET`, `$_POST` or `$_SERVER`
Refactor the settings section registration to a separate function per section