Added launcher for update loyalties function, and tested the code.

Modified the function to use a 1-d array instead of a 2-d one.