fixing table gernation
Small tidy up to generate table script
Making scripts executable