cleaned up rake tasks, moved copy table logic from shell script into ruby.