Cleaned up the insert-job routine