I didn't know whether or not I needed to. I know Erlang the language OK at this point, but the proper OTP idioms are still somewhat opaque to me.  Suggestions as to how to properly structure a piece of code like this are welcomed.