Cleaned up sql scripts and updated with latest index/foreign keys