Avoid if statements with similiar conditions
Make some small improvements
Follow same pattern / no need for req variable
Improve how some vars are getting declared
Imrprove documentation
No need for context reference