Think of this as a proof of concept that borrows heavily from others around the SForce ecosystem and has been expanded to use custom settings to reduce SOQL calls.
It relies on a Custom Setting that is not included here but is easily created.
Use at your own discretion and risk.