Jack - Started pulling out common functionality to other files. Will continue