Refactor code to better handle job information querying