Added more code from old infrastructure project