updated scaffold
added two functions frequently used in import scripts
code cleanup