add function to check S3 import status
template cleanup
move bucket creation to init function
move to new common database functions. import meat split back out into main()