Untitled2.ps1

WIP function for testing purposes..  Major rewrites coming to the code
soon due to some issue discovered with the way data was being stored in
the database..