UC-44 breaking apart file into smaller functions and adding doc blocks